<!DOCTYPE HTML>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>

<input id="input">

<script>
async_test(function(t) {
  var input = document.getElementById("input");
  input.addEventListener("focus", function() {
    t.done();
  });
  var axInput = accessibilityController.accessibleElementById("input");
  axInput.press();
}, "Calling press() focuses an input.");
</script>

<textarea id="textarea"></textarea>

<script>
async_test(function(t) {
  var textarea = document.getElementById("textarea");
  textarea.addEventListener("focus", function() {
    t.done();
  });
  var axTextarea = accessibilityController.accessibleElementById("textarea");
  axTextarea.press();
}, "Calling press() focuses a textarea.");
</script>

<div id="contenteditable" contenteditable></div>

<script>
async_test(function(t) {
  var contenteditable = document.getElementById("contenteditable");
  contenteditable.addEventListener("focus", function() {
    t.done();
  });
  var axContenteditable = accessibilityController.accessibleElementById(
      "contenteditable");
  axContenteditable.press();
}, "Calling press() focuses a contenteditable.");
</script>
